package com.hkts.flow;

import com.hkts.flow.api.constant.FlowConstant;
import com.hkts.flow.manager.config.ApplicationConfiguration;
import com.hkts.flow.manager.servlet.AppDispatcherServletConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Import({

        ApplicationConfiguration.class,
        AppDispatcherServletConfiguration.class
})
@EnableScheduling
@MapperScan(FlowConstant.MAPPER_SCAN)
@EnableTransactionManagement
@SpringBootApplication(scanBasePackages = {"com.hkts"}, exclude = {
        org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
        //如果自定义了安全配置,请检查是否需要排除下面ManagementWebSecurityAutoConfiguration配置
        //org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration.class
})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.hkts.flow.feign")
public class FlowApplication {
    private static final Logger logger = LoggerFactory.getLogger(FlowApplication.class);
    public static void main(String[] args) {
        SpringApplication.run(FlowApplication.class, args);
        logger.info("###########################流程后台程序启动成功##################################");
    }
}
